package com.dunshan.data.service.impl;

import com.alibaba.fastjson.JSON;
import com.dunshan.data.mapper.UserMapper;
import com.dunshan.data.pojo.UmsAdmin;
import com.dunshan.data.service.Userser;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author .dunshan
 * @program: data-umber
 * @description:
 * @date 2021-07-17 16:09:16
 */
@Service
public class UserServiceImpl implements Userser {

    @Autowired
    UserMapper userMapper;


    @Override
    public String master() {
        List<UmsAdmin> umsAdmins = userMapper.selectList(null);
        return JSON.toJSON(umsAdmins).toString();
    }

    @Override
    public String slave() {
        List<UmsAdmin> umsAdmins = userMapper.selectList(null);
        return JSON.toJSON(umsAdmins).toString();
    }
}
